<?php

declare(strict_types=1);

namespace app\admin\controller\config;

use think\Request;
use think\Response;
use sheep\model\Config;
use sheep\controller\Backend;

class Easysms extends Backend
{

    /**
     * 短信配置
     */
    public function index(Request $request): Response
    {
        if ('GET' === $request->method()) {

            $configs = Config::getConfigs('easysms', false);
        } elseif ('PUT' === $request->method()) {

            $configs = Config::setConfigs('easysms', $request->param());

        }
        return success('操作成功', $configs);
    }
}
